package com.zzf.sensitive.aop;

import java.lang.annotation.*;

import com.zzf.sensitive.enums.DecryptTypeEnum;
import com.zzf.sensitive.enums.EncryptTypeEnum;
import com.zzf.sensitive.enums.SensitiveTypeEnum;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
 * 敏感字段注解
 * 加在需要加密/解密的字段上
 *
 * @author zhangzhifu
 * @date 2021/1/15
 **/
@Documented
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Order(Ordered.HIGHEST_PRECEDENCE)
public @interface SensitiveField {
    EncryptTypeEnum encryptType() default EncryptTypeEnum.AES;
    DecryptTypeEnum decryptType() default DecryptTypeEnum.RSA;
}
